package com.qf.mybatisplus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.mybatisplus.dao.StuDao;
import com.qf.mybatisplus.entity.Student;
import com.qf.mybatisplus.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class StuServiceImpl extends ServiceImpl<StuDao, Student> implements StuService {
    @Autowired
    private StuDao stuDao;
    @Override
    @Transactional
    public int insert(Student student){
        return stuDao.insert(student);
    }
    @Override
    public List<Student> list(){
        return stuDao.selectList(null);
    }
}
